// useScrollClass.js
import { ref, onMounted, onUnmounted } from 'vue';
 
export function useScrollClass() {
  const isScrolling = ref(false);
 
  const handleScroll = () => {
    if (window.scrollY > 0) {
      isScrolling.value = true;
    } else {
      isScrolling.value = false;
    }
  };
 
  onMounted(() => {
    window.addEventListener('scroll', handleScroll);
  });
 
  onUnmounted(() => {
    window.removeEventListener('scroll', handleScroll);
  });
 
  return isScrolling;
}